﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Commons.ReturnData
{
    public class MessageResult
    {
        public int Code { get; set; } = 200;
        public string Message { get; set; } = "";
        public bool Successed { get; protected set; }
        public bool Failed { get; protected set; }


        public MessageResult(int code, string message, bool b)
        {
            Code = code;
            Message = message;
            if (b)
            {
                Successed = true;
            }
            else
            {
                Failed = true;
            }
        }
        public MessageResult(string message)
        {
            Message = message;
            Successed = true;
        }
        public MessageResult() { }
    }
}
